package com.msb.mall.search;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;

//@EnableFeignClients(basePackages = "com.msb.api.feign")
@EnableDiscoveryClient
//@MapperScan("com.msb.mall.core")  // 未使用mybatis 依赖，不能自动注入，需要注释
// 增加扫包注解后，才能读到commons公共包的一些 全局异常
@ComponentScan(basePackages = "com.msb")
// 公共依赖中依赖了MyBatisPlus所以我们需要在search服务中排除数据源,不然启动会报错
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class MallSearchApplication {

    public static void main(String[] args) {
        SpringApplication.run(MallSearchApplication.class, args);
    }
}
